<?php

/**
 * MembreGroupe form base class.
 *
 * @method MembreGroupe getObject() Returns the current form's model object
 *
 * @package    tfe
 * @subpackage form
 * @author     3emeIG
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseMembreGroupeForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_groupe'  => new sfWidgetFormInputHidden(),
      'id_contact' => new sfWidgetFormInputHidden(),
    ));

    $this->setValidators(array(
      'id_groupe'  => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id_groupe', 'required' => false)),
      'id_contact' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id_contact', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('membre_groupe[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'MembreGroupe';
  }

}
